<script setup>
import { useRouter } from 'vue-router'
const router = useRouter()
</script>

<template>
  <!-- 置顶模块 -->
  <div class="model">
    <el-carousel height="270px">
      <el-carousel-item>
        <img src="https://bit-1310383539.cos.ap-chengdu.myqcloud.com/note-imgs/1675152910243-0.jpg" class="img" />
      </el-carousel-item>
      <el-carousel-item>
        <img src="https://bit-1310383539.cos.ap-chengdu.myqcloud.com/note-imgs/1666594529103-1.jpg" class="img" />
      </el-carousel-item>
      <el-carousel-item>
        <img src="https://bit-1310383539.cos.ap-chengdu.myqcloud.com/note-imgs/1666594529103-6.jpg" class="img" />
      </el-carousel-item>
      <el-carousel-item>
        <img src="https://bit-1310383539.cos.ap-chengdu.myqcloud.com/note-imgs/1674922554694-0.jpg" class="img" />
      </el-carousel-item>
    </el-carousel>

    <div class="in-model">
      <div class="text">
        <div class="tittle">本站升级全新VUE架构✨</div>
        <div class="content">
          终于换到VUE3的结构了，页面请求少了70%，加载速度更快，代码复用率提高！
          UI设计更加精美，采用毛玻璃效果，可以自定义CSS，更多功能等你发现！
          提供生活记录功能和人际关系管理功能！<br />
          朋友们帮我点个Star吧，Gitee：<a href="https://gitee.com/bit-01/MyLog" target="_black">https://gitee.com/bit-01/MyLog</a>
        </div>
      </div>
      <div class="info">
        <span class="author" @click="router.push('/user?name=Sybit')">Sybit</span>&nbsp;·
        <!-- <span class="date">2023-4-7</span>&nbsp;· -->
        <span class="class">置顶</span>
      </div>
    </div>
  </div>
</template>

<style scoped lang="less">
.model {
  padding: 0px;

  /* 用于顶部的img */
  .img {
    height: 100%;
    width: 100%;
    object-fit: cover;

  }

  .in-model {
    margin: 10px 20px 10px;

    /* 文本框************************* */
    .text {

      .tittle {
        font-weight: 600;
        font-size: 25px;
        /* 超出省略号（单行） */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .content {
        margin-top: 5px;
        /* 超出省略号（多行） */
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        overflow: hidden;
      }
    }

    /* 最下方信息*********************** */
    .info {
      margin-top: 10px;
      font-size: 15px;

      * {
        display: inline-block;
        color: var(--mini-text-color);
        vertical-align: top;
      }

      .author {
        max-width: 40%;
        cursor: pointer;
        /* 超出省略号（单行） */
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
    }
  }
}
</style>